MyRestController

@RequestMapping(value = "/users")
open class MyRestController

Constructors

Link copied to clipboard
constructor(userRepository: UserRepository, customerRepository: CustomerRepository)

Functions

Link copied to clipboard
@DeleteMapping(value = "/{userId}")
open fun deleteUser(@PathVariable userId: Long)
Link copied to clipboard
@GetMapping(value = "/{userId}")
open fun getUser(@PathVariable userId: Long): User
Link copied to clipboard
@GetMapping(value = "/{userId}/customers")
open fun getUserCustomers(@PathVariable userId: Long): List<Customer>